<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MenuModel extends CI_Model
{   public function montarMenu()
    {   $this->db->where('menu', 'S');
        return $this->db->get('CATEGORIA');
    }
    public function itensMenu($idCategoria)
    {   $this->db->where('categoria',$idCategoria);
        $this->db->where('menu','S');
        $this->db->limit(5);
        $this->db->order_by('codigo_pagina', 'DESC');
        return $this->db->get('PAGINA');        
    }
    public function montarMenuBiologia()
    {   $this->db->where('codigo_categoria >', '14');
        $this->db->where('codigo_categoria <', '26');
        $this->db->where('menu','S');
        $this->db->order_by('descricao');
        return $this->db->get('CATEGORIA');
    }        
}

